package main

import (
	"fmt"
	"math"
)

func main() {
	res := angleClock(12,30)
	fmt.Println(res)
}

func angleClock(hour int, minutes int) float64 {
	m := float64(minutes * 6)
	h := (float64(hour%12) + float64(minutes)/float64(60))*30
	res := math.Abs(float64(m)-float64(h))
	if 360-res < res{
		return 360-res
	}
	return res
}
